projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb7500e
)
gtk-demo: Improve display of image sources
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 7 Jun 2020 02:06:58 +0000
(22:06 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Sun, 7 Jun 2020 02:12:12 +0000
(22:12 -0400)
Make the images expand to fill the space.
demos/gtk-demo/main.c
patch
|
blob
|
history
diff --git
a/demos/gtk-demo/main.c
b/demos/gtk-demo/main.c
index f9ea82c9cd314a70606b56df5ceeda5501d77d7d..51846edaeb4482f0d975519e149489a9552bac73 100644
(file)
--- a/
demos/gtk-demo/main.c
+++ b/
demos/gtk-demo/main.c
@@
-599,7
+599,7
@@
display_image (const char *resource)
{
GtkWidget *sw, *image;
- image = gtk_
image_new_from
_resource (resource);
+ image = gtk_
picture_new_for
_resource (resource);
gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
sw = gtk_scrolled_window_new (NULL, NULL);